package com.wanlian.service;

import com.wanlian.common.PageCondition;
import com.wanlian.entity.Card;
import com.wanlian.entity.User;
import com.wanlian.model.ResultModel;
import com.wanlian.vo.Page;

import java.util.List;

public interface CardServices {
	/**
	 * 添加
	 * 
	 * @param card
	 * @return
	 */
	ResultModel doAdd(Card card);


	/**
	 * 添加
	 *
	 * @param cards
	 * @return
	 */
	ResultModel doAdd(List<Card> cards,int productId);

	/**
	 * 
	 * @param card
	 * @return
	 */
	ResultModel doedit(Card card);

	/**
	 * 通过页码和条件查询
	 *
	 * @param pageCondition
	 * @return
	 */
	ResultModel queryCard(PageCondition pageCondition);

	ResultModel queryCardByUser(Page page, int userId);

	/**
	 * 卡片兑换
	 * @param card
	 * @param user
	 * @return
	 */
	ResultModel doConverCardByUser(Card card, User user);
}
